home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
- From: Mark Seaborn <cms024@email.mot.com>
- Subject: Re: template functions
- Content-Type: text/plain; charset=us-ascii
- Organization: MOTOROLA
- Date: Mon, 15 Jan 1996 10:22:21 -0600
- Message-ID: <30FA7F3D.6722@email.mot.com>
- X-Mailer: Mozilla 2.0b5 (Macintosh; I; 68K)
- Mime-Version: 1.0
- Content-Transfer-Encoding: 7bit
- References: <4d5cd4$hli@ousrvr3.oulu.fi>
- Sender: news@schbbs.mot.com (SCHBBS News Account)
- Nntp-Posting-Host: 145.1.202.19
-
- What I usually do in this case is create a header for the class
- protocol and then use the scope operator to define the class in
- another file
-
- class.h
-
- template <class ElemType>
- class foo
- {
- foo()
- ~foo();
- int getfoo();
- };
-
- class.C
- template <class ElemType>
- foo<ElemType>::foo()
- {
- }
-
- template <class ElemType>
- foo<ElemType>::~foo()
- {
- }
-
- template <class ElemType>
- int foo<ElemType>::getfoo()
- {
- }
- --
- ********************************************************************
- *
- * Mark Seaborn | ITTTools : mseaborn@itthp1.comm.mot.com
- *
- * Motorola | KU : mseaborn@hawk.cs.ukans.edu
- *
- * 1301 E. Algonquin Rd. | Macintosh : cms024@email.mot.com
- *
- * Schaumburg, IL. 60196 | Voice : 708/538-5303
- *
- * Maildrop: IL02/Rm0442 | Fax : 708/576-2619
- *
- ********************************************************************
- *
- * AKA : Conan the Saute' Man
- *
-